#ifndef LISTWIDGET_H
#define LISTWIDGET_H

#include <QListWidget>

class MeatterData;

class ListWidget : public QListWidget
{
    Q_OBJECT
public:
    explicit ListWidget(QWidget *parent = 0);

    void UpdateListContent();
    QListWidgetItem* CreateListItem(QString str);
    void ResetFlag();
protected:
    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);

    void MouseLongPress();
    void ItemDoubleClicked_();

signals:
    
public slots:
    void DelItem();
    void ItemClick();
private:
    int isDoubleClick;
    MeatterData* meatter;
    QTime* time;//针对长按事件
    QTimer* timer;//针对点击事件
    QAction* action;
};

#endif // LISTWIDGET_H
